import { ApiPrefixEnum } from '@/enums'
import { get, post, put } from '@/utils/http'

export interface AppLogo {
  fileId: string
  logoName: string
  logoUrl: string
  enable: boolean
}

export const projectSettingApis = {
  // 获取应用图标列表
  getAppIconList: () => get<AppLogo[]>(`${ApiPrefixEnum.CONTRACT}/oa/ops/application/logo/list`),
  // 保存应用图标
  saveAppIcon: (data: any) => post<any>(`${ApiPrefixEnum.CONTRACT}/oa/ops/application/logo/save`, data),
  // 停用应用图标
  disableAppIcon: (fileId: string) => put<any>(`${ApiPrefixEnum.CONTRACT}/oa/ops/application/logo/disable?fileId=${fileId}`),
  // 启用应用图标
  enableAppIcon: (fileId: string) => put<any>(`${ApiPrefixEnum.CONTRACT}/oa/ops/application/logo/enable?fileId=${fileId}`),
}
